package org.ghost.quickstart.scalac.loop

import org.ghost.quickstart.scalac.traits.BaseTrait

object WhileLoop extends BaseTrait {
  override def print(): Unit = {
    var sum = 100
    while (sum > 20) {
      sum = sum + 1
      if (sum > 120) {
        println("结束循环:" + sum)
        return
      }
    }
  }
}
